package com.fingard.dsp.bank.reqrespobj.billpool;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RetAtsBase;
import com.fingard.dsp.bank.reqrespobj.billpool.Detail.RetAtsB301OperBillQryDetail;
import com.fingard.xml.XmlTextWriter;

//可操作票据查询
public class RetAtsB301OperBillQry extends RetAtsBase {
    public String RespCode;
    public String RespInfo;

    public RetAtsB301OperBillQry(ReqRespHeader p_header) {
        retHeader = p_header;
        retXmlWriter = new XmlTextWriter();//用于输出返回ATS的XML报文
    }

    public void writeBefore(){
        writeStart();
        retXmlWriter.writeElementString("RespCode", RespCode);
        retXmlWriter.writeElementString("RespInfo", RespInfo);
    }

    public void writeCodeInfo(){
        retXmlWriter.writeElementString("RespCode", RespCode);
        retXmlWriter.writeElementString("RespInfo", RespInfo);
    }

    public void WriteAfter() {
        writeEnd();
    }

    public void writeDetail(RetAtsB301OperBillQryDetail B3001Detail) {
        retXmlWriter.writeStartElement("DetailRecord");

//        retXmlWriter.writeElementString("TransState",B3001Detail.TransState);
        retXmlWriter.writeElementString("BillType",B3001Detail.BillType);
        retXmlWriter.writeElementString("BillNum",B3001Detail.BillNum);
        retXmlWriter.writeElementString("DrawDate",B3001Detail.DrawDate);
        retXmlWriter.writeElementString("DueDate",B3001Detail.DueDate);
        retXmlWriter.writeElementString("BillMoney",B3001Detail.BillMoney);
        retXmlWriter.writeElementString("BillState",B3001Detail.BillState);

        retXmlWriter.writeElementString("BillDrawer",B3001Detail.BillDrawer);
        retXmlWriter.writeElementString("DrawerAccount",B3001Detail.DrawerAccount);
        retXmlWriter.writeElementString("DrawerBankName",B3001Detail.DrawerBankName);
        retXmlWriter.writeElementString("DrawerCNAPSCode",B3001Detail.DrawerCNAPSCode);

        retXmlWriter.writeElementString("Acceptor",B3001Detail.Acceptor);
        retXmlWriter.writeElementString("AcceptorAccountNum",B3001Detail.AcceptorAccountNum);
        retXmlWriter.writeElementString("AcceptorCNAPSCode",B3001Detail.AcceptorCNAPSCode);
        retXmlWriter.writeElementString("AcceptorBankName",B3001Detail.AcceptorBankName);

        retXmlWriter.writeElementString("Payee",B3001Detail.Payee);
        retXmlWriter.writeElementString("PayeeBankName",B3001Detail.PayeeBankName);
        retXmlWriter.writeElementString("PayeeAccountNum",B3001Detail.PayeeAccountNum);
        retXmlWriter.writeElementString("PayeeCNAPSCode",B3001Detail.PayeeCNAPSCode);

        retXmlWriter.writeElementString("Interest",B3001Detail.Interest);

        retXmlWriter.writeElementString("BusiNo",B3001Detail.BusiNo);
        retXmlWriter.writeElementString("BusiType",B3001Detail.BusiType);
        retXmlWriter.writeElementString("QueryType",B3001Detail.QueryType);
        retXmlWriter.writeElementString("TransFlag",B3001Detail.TransFlag);
        retXmlWriter.writeElementString("DrawCode",B3001Detail.DrawCode);
        retXmlWriter.writeElementString("MustPay",B3001Detail.MustPay);
        retXmlWriter.writeElementString("ApplyDate",B3001Detail.ApplyDate);
        retXmlWriter.writeElementString("ApplyAct",B3001Detail.ApplyAct);
        retXmlWriter.writeElementString("ApplyName",B3001Detail.ApplyName);
        retXmlWriter.writeElementString("ApplyBnkName",B3001Detail.ApplyBnkName);
        retXmlWriter.writeElementString("ApplyBnkCode",B3001Detail.ApplyBnkCode);
        retXmlWriter.writeElementString("ApplyCode",B3001Detail.ApplyCode);

        retXmlWriter.writeElementString("ReceName",B3001Detail.ReceName);
        retXmlWriter.writeElementString("ReceCode",B3001Detail.ReceCode);
        retXmlWriter.writeElementString("ReceAct",B3001Detail.ReceAct);
        retXmlWriter.writeElementString("ReceBnkName",B3001Detail.ReceBnkName);
        retXmlWriter.writeElementString("ReceBnkCode",B3001Detail.ReceBnkCode);

        retXmlWriter.writeElementString("DiscType",B3001Detail.DiscType);
        retXmlWriter.writeElementString("RepOpenDate",B3001Detail.RepOpenDate);
        retXmlWriter.writeElementString("RepDueDate",B3001Detail.RepDueDate);
        retXmlWriter.writeElementString("DiscRate",B3001Detail.DiscRate);
        retXmlWriter.writeElementString("RepRate",B3001Detail.RepRate);
        retXmlWriter.writeElementString("PayType",B3001Detail.PayType);
        retXmlWriter.writeElementString("RecourseAmt",B3001Detail.RecourseAmt);
        retXmlWriter.writeElementString("Memo",B3001Detail.Memo);
        retXmlWriter.writeElementString("OverDueRea",B3001Detail.OverDueRea);
        retXmlWriter.writeElementString("ContractNo",B3001Detail.ContractNo);
        retXmlWriter.writeElementString("ClientId",B3001Detail.ClientId);
        retXmlWriter.writeElementString("ClientName",B3001Detail.ClientName);
        retXmlWriter.writeElementString("HolderBillAcc",B3001Detail.HolderBillAcc);
        retXmlWriter.writeElementString("CollType",B3001Detail.CollType);

        retXmlWriter.writeEndElement();
    }
}
